package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.house.HouseInformation;
import com.ruoyi.system.domain.house.HouseInformationDetail;
import com.ruoyi.system.domain.house.vo.SearchSubmitHouseInformationVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author caiden
 * @Description
 * @email 772149497@qq.com
 * @create 2021-04-05 11:31
 */
@Repository
@Mapper
public interface HouseInformationMapper {
    int checkHouseInformationCode(@Param("code") String code);

    int addHouseInformation(@Param("data")HouseInformation houseInformation);

    int editorHouseInformation(@Param("data")HouseInformation houseInformation);

    int addHouseInformationDetail(@Param("dataArray") List<HouseInformationDetail> houseInformationDetails);

    int deleteHouseInformationDetail(@Param("dataArray") List<HouseInformationDetail> houseInformationDetails);

    int editorHouseInformationDetail(@Param("dataArray") List<HouseInformationDetail> houseInformationDetails);

    int deleteHouseInformationById(@Param("id") String id);

    HouseInformation selectHouseInformationById(@Param("id") String id);

    List<HouseInformationDetail> selectHouseInformationDetailByHouseInformationId(@Param("houseInformationId")String houseInformationId,@Param("startPosition") Integer startPosition,@Param("size") Integer size);

    int countHouseInformationDetailByHouseInformationId(@Param("houseInformationId")String houseInformationId);

    List<HouseInformation> searchHouseInformation(@Param("condition")SearchSubmitHouseInformationVO searchSubmitHouseInformationVO,@Param("startPosition") Integer startPosition);

    int countSearchHouseInformation(@Param("condition")SearchSubmitHouseInformationVO searchSubmitHouseInformationVO);
}
